<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
	<meta charset="utf-8">
	<title>添加端口</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" th:href="@{/static/plugin/layui/css/layui.css}" media="all" />
	<link rel="stylesheet" th:href="@{/static/plugin/layui/css/font_eolqem241z66flxr.css}" media="all" />
</head>
<body class="childrenBody">
	<form class="layui-form" id="iotconfig" style="width:80%;" action="/iot/manager/add" enctype="multipart/form-data" method="post">
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">所属设备</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="deviceName" lay-verify="required"
						   th:value="${iotConfig?.deviceName}" placeholder="请输入设备名称">
				</div>
		  </div>
			<div class="layui-inline">
				<label class="layui-form-label">端口</label>
				<div class="layui-input-block">
					<input type="text" name="port" class="layui-input" th:value="${iotConfig?.port}"
						   lay-verify="required" placeholder="请输入端口">
				</div>
			</div>
			<div  class="layui-inline">
				<div class="layui-form-item">
					<label class="layui-form-label">心跳时间</label>
					<div class="layui-input-block">
						<input type="text"  class="layui-input" name="allIdleTime"
							   th:value="${iotConfig?.allIdleTime}">
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">监听线程数</label>
				<div class="layui-input-block">
					<input type="text" class="layui-input" name="boss"
						   th:value="${iotConfig?.boss}">
				</div>
			</div>
			<div class="layui-inline">
				<label class="layui-form-label">处理线程数</label>
				<div class="layui-input-inline">
					<input type="text"  class="layui-input" name="work"
						   th:value="${iotConfig?.work}">
				</div>
			</div>
			<!--<div  class="layui-inline">
				<label class="layui-form-label">请求队列大小</label>
				<div class="layui-input-block">
					<input type="text"  class="layui-input" name="queueLength"
						   th:value="${iotConfig?.queueLength}">
				</div>
			</div>-->
		</div>
	<!--	<div class="layui-form-item">
			<label class="layui-form-label">解码器类路径</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" name="decoder"  th:value="${iotConfig?.decoder}">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">编码器类路径</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" name="encoder"
					   th:value="${iotConfig?.encoder}">
			</div>
		</div>-->
		<div class="layui-form-item">
			<label class="layui-form-label">handler类路径</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" name="handler"
					   th:value="${iotConfig?.handler}" lay-verify="required">
			</div>
		</div>
		<!--<div class="layui-form-item">
			<label class="layui-form-label">是否开启端口</label>
			<div class="layui-input-block">
				<input type="radio" th:checked="${iotConfig?.isOpen eq '0'}"
							   name="isOpen" value="0" title="禁用端口">
				<input type="radio" th:checked="${iotConfig?.isOpen eq '1'}"
							   name="isOpen" value="1" title="开启端口">
			</div>
		</div>-->
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" th:if="${iotConfig eq null}" type="submit" lay-submit  lay-filter="save"> 立即提交</button>
				<button class="layui-btn" th:if="${iotConfig ne null}" type="submit" lay-submit  lay-filter="edit"> 修改</button>
				<!--<input class="layui-btn" type="reset" value="重置">-->
				<button class="layui-btn  icon-position-button" id="reset" type="reset" lay-event="reset">
					重置
				</button>
		    </div>
		</div>
	</form>
	<script type="text/javascript" th:src="@{/static/plugin/layui/layui.js}"></script>
	<script type="text/javascript" th:src="@{/static/js/iot/server_Add.js}"></script>
</body>
</html>